if (SERVER) then
	AddCSLuaFile("shared.lua");
	
	SWEP.Weight				= 5;
	SWEP.AutoSwitchTo		= false;
	SWEP.AutoSwitchFrom		= false;
end;

if (CLIENT) then
	SWEP.PrintName			= "Hands";
	SWEP.Instructions		= "Primary fire: Harvest.";
	SWEP.DrawAmmo			= false;
	SWEP.ViewModelFOV		= 70;
	SWEP.ViewModelFlip		= false;
	SWEP.CSMuzzleFlashes	= false;
end;

SWEP.Spawnable				= false;
SWEP.AdminSpawnable			= false;

SWEP.ViewModel				= "models/weapons/v_fists.mdl";
SWEP.WorldModel				= "models/weapons/w_fists.mdl";

SWEP.Primary.ClipSize		= -1;
SWEP.Primary.DefaultClip	= -1;
SWEP.Primary.Automatic		= true;
SWEP.Primary.Ammo			= "none";

SWEP.Secondary.ClipSize		= -1;
SWEP.Secondary.DefaultClip	= -1;
SWEP.Secondary.Automatic	= false;
SWEP.Secondary.Ammo			= "none";

function SWEP:Initialize()
	self:SetWeaponHoldType("fist");
end;

function SWEP:PrimaryAttack()
	self.Weapon:SetNextPrimaryFire(CurTime() +0.5);
	self.Owner:SetAnimation(PLAYER_ATTACK1);
	
	if (SERVER) then
		local tr = self.Owner:EyeTrace(150);
	
		if (IsValid(tr.Entity)) then
			if (tr.Entity:IsTreeModel()) then
				local process = {
					Entity = tr.Entity,
					Chance = 33,
					MinAmount = 1,
					MaxAmount = 3,
					hitPosition = tr.HitPos
				};
				
				self.Owner:DoProcess("WoodCutting", 3, process);
			elseif (tr.Entity:IsRockModel()) then
				local process = {
					Entity = tr.Entity,
					Chance = 33,
					MinAmount = 1,
					MaxAmount = 2,
					hitPosition = tr.HitPos
				};
				
				self.Owner:DoProcess("Mining", 3, process);
			end;
		end;
	end;
end;

function SWEP:SecondaryAttack()
end;

function SWEP:Reload()
end;
